import { Component, Emit, Prop, Watch } from 'vue-facing-decorator'
import Render from '@/render/Render'
import toNative from '@/utils/toNative'
import { Textarea, InputNumber, Modal } from 'ant-design-vue'

@Component
export class DrawMoneyPop extends Render {
    showModal = false

    @Prop({ default: false }) show!: boolean
    // @Prop() basicInfo!: LongInsuranceCaseListDto<ReportCaseResultDto>
    @Emit('update:show')
    showChange(val: boolean) {return val}

    @Emit('refresh')
    handleRefresh() {}

    @Watch('show', { immediate: true })
    async handleWatchShow() {
        this.showModal = this.show
        // if (this.show) {
        //     this.basicInfo.isVisible = 1
        //     initModelValue(this.formConfig, this.basicInfo)
        // }
    }
    
    @Watch('showModal', { immediate: true })
    handleWatchShowDialog() {
        this.showChange(this.showModal)
    }

    render() { 
        return (
            <>
                <Modal v-model:open={ this.showModal } title="长期保提现">
                    <div>
                        <div>苏州国有服务外包公司</div>
                        <div class="flex items-center w-full mt-8">
                            <div class="w-84 text-right"> <span class="text-[#FF4D4F]">* </span> 提现金额：</div>
                            <div class="flex-1">
                                <InputNumber style="width: 100%" placeholder="请输入金额" />
                            </div>
                        </div>
                        <div class="flex items-center mt-8">
                            <div class="opacity-0 w-84">*提现金额</div>
                            <div>
                                <div class="flex items-center">
                                    <div class="text-black-300 text-sm">账户余额：￥10000.00</div>
                                    <div class="text-blue-100 text-sm ml-8">全部提现</div>
                                </div>
                                <div class="mt-8 text-black-300 text-sm">明日保费需扣除金额：￥500.00</div>
                            </div>
                        </div>
                        <div class="flex mt-16 mb-30px">
                            <div class="flex-none w-84 text-right">备注：</div>
                            <Textarea showCount={true} maxlength={ 100 } class="flex-1" placeholder="请输入备注信息" style="width:100%" />
                        </div>
                    </div>
                </Modal>
            </>
        )
    }

}

export default toNative<{}, {}>(DrawMoneyPop)